/**
 * Copyright 2009. Felix Dorner.
 * This code is licensed under the Eclipse Public License v1.0
 * http://www.eclipse.org/org/documents/epl-v10.html
 *
 * $Id$
 */
package com.objectcarpentry.kaylee.impl;

import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EGenericType;
import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.ETypeParameter;
import org.eclipse.emf.ecore.impl.EPackageImpl;

import com.objectcarpentry.kaylee.AbstractPlaylist;
import com.objectcarpentry.kaylee.FilteredPlaylist;
import com.objectcarpentry.kaylee.IPlayable;
import com.objectcarpentry.kaylee.IPlayableFilter;
import com.objectcarpentry.kaylee.IPlayer;
import com.objectcarpentry.kaylee.IPlayerEvent;
import com.objectcarpentry.kaylee.IPlayerListener;
import com.objectcarpentry.kaylee.IPlaylist;
import com.objectcarpentry.kaylee.IPlaylistController;
import com.objectcarpentry.kaylee.KayleeFactory;
import com.objectcarpentry.kaylee.KayleePackage;
import com.objectcarpentry.kaylee.Library;
import com.objectcarpentry.kaylee.Playable;
import com.objectcarpentry.kaylee.PlayableState;
import com.objectcarpentry.kaylee.Playlist;
import com.objectcarpentry.kaylee.PlaylistEntry;
import com.objectcarpentry.kaylee.Track;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Package</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class KayleePackageImpl extends EPackageImpl implements KayleePackage {
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final String copyright = "Copyright 2009. Felix Dorner.\nThis code is licensed under the Eclipse Public License v1.0\nhttp://www.eclipse.org/org/documents/epl-v10.html";

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass trackEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass libraryEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass playlistEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass playlistEntryEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass iPlayableEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass iPlaylistEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass playableEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass abstractPlaylistEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass filteredPlaylistEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass iPlayerEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass iPlayerListenerEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass iPlayerEventEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EEnum playableStateEEnum = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EDataType uriEDataType = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EDataType iPlaylistControllerEDataType = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EDataType iPlayableFilterEDataType = null;

	/**
	 * Creates an instance of the model <b>Package</b>, registered with
	 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
	 * package URI value.
	 * <p>Note: the correct way to create the package is via the static
	 * factory method {@link #init init()}, which also performs
	 * initialization of the package, or returns the registered package,
	 * if one already exists.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see org.eclipse.emf.ecore.EPackage.Registry
	 * @see com.objectcarpentry.kaylee.KayleePackage#eNS_URI
	 * @see #init()
	 * @generated
	 */
	private KayleePackageImpl() {
		super(eNS_URI, KayleeFactory.eINSTANCE);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static boolean isInited = false;

	/**
	 * Creates, registers, and initializes the <b>Package</b> for this
	 * model, and for any others upon which it depends.  Simple
	 * dependencies are satisfied by calling this method on all
	 * dependent packages before doing anything else.  This method drives
	 * initialization for interdependent packages directly, in parallel
	 * with this package, itself.
	 * <p>Of this package and its interdependencies, all packages which
	 * have not yet been registered by their URI values are first created
	 * and registered.  The packages are then initialized in two steps:
	 * meta-model objects for all of the packages are created before any
	 * are initialized, since one package's meta-model objects may refer to
	 * those of another.
	 * <p>Invocation of this method will not affect any packages that have
	 * already been initialized.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #eNS_URI
	 * @see #createPackageContents()
	 * @see #initializePackageContents()
	 * @generated
	 */
	public static KayleePackage init() {
		if (isInited) return (KayleePackage)EPackage.Registry.INSTANCE.getEPackage(KayleePackage.eNS_URI);

		// Obtain or create and register package
		KayleePackageImpl theKayleePackage = (KayleePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof KayleePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new KayleePackageImpl());

		isInited = true;

		// Create package meta-data objects
		theKayleePackage.createPackageContents();

		// Initialize created meta-data
		theKayleePackage.initializePackageContents();

		// Mark meta-data to indicate it can't be changed
		theKayleePackage.freeze();

		return theKayleePackage;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getTrack() {
		return trackEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getTrack_Title() {
		return (EAttribute)trackEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getTrack_Artist() {
		return (EAttribute)trackEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getTrack_Location() {
		return (EAttribute)trackEClass.getEStructuralFeatures().get(2);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getTrack_Hash() {
		return (EAttribute)trackEClass.getEStructuralFeatures().get(3);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getLibrary() {
		return libraryEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getLibrary_Elements() {
		return (EReference)libraryEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getLibrary_Playlists() {
		return (EReference)libraryEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getPlaylist() {
		return playlistEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getPlaylist_Elements() {
		return (EReference)playlistEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getPlaylist_Name() {
		return (EAttribute)playlistEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getPlaylistEntry() {
		return playlistEntryEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getPlaylistEntry_Track() {
		return (EReference)playlistEntryEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getPlaylistEntry_Playlist() {
		return (EReference)playlistEntryEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getIPlayable() {
		return iPlayableEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getIPlaylist() {
		return iPlaylistEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getPlayable() {
		return playableEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getPlayable_State() {
		return (EAttribute)playableEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getAbstractPlaylist() {
		return abstractPlaylistEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getAbstractPlaylist_Controller() {
		return (EAttribute)abstractPlaylistEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getFilteredPlaylist() {
		return filteredPlaylistEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getFilteredPlaylist_Filter() {
		return (EAttribute)filteredPlaylistEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getFilteredPlaylist_Delegate() {
		return (EReference)filteredPlaylistEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getFilteredPlaylist_Elements() {
		return (EReference)filteredPlaylistEClass.getEStructuralFeatures().get(2);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EDataType getIPlaylistController() {
		return iPlaylistControllerEDataType;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EDataType getIPlayableFilter() {
		return iPlayableFilterEDataType;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getIPlayer() {
		return iPlayerEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getIPlayerListener() {
		return iPlayerListenerEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getIPlayerEvent() {
		return iPlayerEventEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EEnum getPlayableState() {
		return playableStateEEnum;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EDataType getURI() {
		return uriEDataType;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public KayleeFactory getKayleeFactory() {
		return (KayleeFactory)getEFactoryInstance();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private boolean isCreated = false;

	/**
	 * Creates the meta-model objects for the package.  This method is
	 * guarded to have no affect on any invocation but its first.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void createPackageContents() {
		if (isCreated) return;
		isCreated = true;

		// Create classes and their features
		trackEClass = createEClass(TRACK);
		createEAttribute(trackEClass, TRACK__TITLE);
		createEAttribute(trackEClass, TRACK__ARTIST);
		createEAttribute(trackEClass, TRACK__LOCATION);
		createEAttribute(trackEClass, TRACK__HASH);

		libraryEClass = createEClass(LIBRARY);
		createEReference(libraryEClass, LIBRARY__ELEMENTS);
		createEReference(libraryEClass, LIBRARY__PLAYLISTS);

		playlistEClass = createEClass(PLAYLIST);
		createEReference(playlistEClass, PLAYLIST__ELEMENTS);
		createEAttribute(playlistEClass, PLAYLIST__NAME);

		playlistEntryEClass = createEClass(PLAYLIST_ENTRY);
		createEReference(playlistEntryEClass, PLAYLIST_ENTRY__TRACK);
		createEReference(playlistEntryEClass, PLAYLIST_ENTRY__PLAYLIST);

		iPlayableEClass = createEClass(IPLAYABLE);

		iPlaylistEClass = createEClass(IPLAYLIST);

		playableEClass = createEClass(PLAYABLE);
		createEAttribute(playableEClass, PLAYABLE__STATE);

		abstractPlaylistEClass = createEClass(ABSTRACT_PLAYLIST);
		createEAttribute(abstractPlaylistEClass, ABSTRACT_PLAYLIST__CONTROLLER);

		filteredPlaylistEClass = createEClass(FILTERED_PLAYLIST);
		createEAttribute(filteredPlaylistEClass, FILTERED_PLAYLIST__FILTER);
		createEReference(filteredPlaylistEClass, FILTERED_PLAYLIST__DELEGATE);
		createEReference(filteredPlaylistEClass, FILTERED_PLAYLIST__ELEMENTS);

		iPlayerEClass = createEClass(IPLAYER);

		iPlayerListenerEClass = createEClass(IPLAYER_LISTENER);

		iPlayerEventEClass = createEClass(IPLAYER_EVENT);

		// Create enums
		playableStateEEnum = createEEnum(PLAYABLE_STATE);

		// Create data types
		uriEDataType = createEDataType(URI);
		iPlaylistControllerEDataType = createEDataType(IPLAYLIST_CONTROLLER);
		iPlayableFilterEDataType = createEDataType(IPLAYABLE_FILTER);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private boolean isInitialized = false;

	/**
	 * Complete the initialization of the package and its meta-model.  This
	 * method is guarded to have no affect on any invocation but its first.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void initializePackageContents() {
		if (isInitialized) return;
		isInitialized = true;

		// Initialize package
		setName(eNAME);
		setNsPrefix(eNS_PREFIX);
		setNsURI(eNS_URI);

		// Create type parameters
		ETypeParameter abstractPlaylistEClass_T = addETypeParameter(abstractPlaylistEClass, "T");
		ETypeParameter iPlaylistControllerEDataType_T = addETypeParameter(iPlaylistControllerEDataType, "T");

		// Set bounds for type parameters
		EGenericType g1 = createEGenericType(this.getPlayable());
		abstractPlaylistEClass_T.getEBounds().add(g1);
		g1 = createEGenericType(this.getPlayable());
		iPlaylistControllerEDataType_T.getEBounds().add(g1);

		// Add supertypes to classes
		trackEClass.getESuperTypes().add(this.getPlayable());
		g1 = createEGenericType(this.getAbstractPlaylist());
		EGenericType g2 = createEGenericType(this.getTrack());
		g1.getETypeArguments().add(g2);
		libraryEClass.getEGenericSuperTypes().add(g1);
		g1 = createEGenericType(this.getAbstractPlaylist());
		g2 = createEGenericType(this.getPlaylistEntry());
		g1.getETypeArguments().add(g2);
		playlistEClass.getEGenericSuperTypes().add(g1);
		playlistEntryEClass.getESuperTypes().add(this.getPlayable());
		iPlaylistEClass.getESuperTypes().add(this.getIPlayable());
		playableEClass.getESuperTypes().add(this.getIPlayable());
		abstractPlaylistEClass.getESuperTypes().add(this.getPlayable());
		abstractPlaylistEClass.getESuperTypes().add(this.getIPlaylist());
		g1 = createEGenericType(this.getAbstractPlaylist());
		g2 = createEGenericType(this.getPlayable());
		g1.getETypeArguments().add(g2);
		filteredPlaylistEClass.getEGenericSuperTypes().add(g1);

		// Initialize classes and features; add operations and parameters
		initEClass(trackEClass, Track.class, "Track", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getTrack_Title(), ecorePackage.getEString(), "title", null, 0, 1, Track.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getTrack_Artist(), ecorePackage.getEString(), "artist", null, 0, 1, Track.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getTrack_Location(), this.getURI(), "location", null, 0, 1, Track.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getTrack_Hash(), ecorePackage.getEByteArray(), "hash", null, 0, 1, Track.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(libraryEClass, Library.class, "Library", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getLibrary_Elements(), this.getTrack(), null, "elements", null, 0, -1, Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getLibrary_Playlists(), this.getPlaylist(), null, "playlists", null, 0, -1, Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(playlistEClass, Playlist.class, "Playlist", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getPlaylist_Elements(), this.getPlaylistEntry(), this.getPlaylistEntry_Playlist(), "elements", null, 0, -1, Playlist.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getPlaylist_Name(), ecorePackage.getEString(), "name", null, 0, 1, Playlist.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(playlistEntryEClass, PlaylistEntry.class, "PlaylistEntry", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getPlaylistEntry_Track(), this.getTrack(), null, "track", null, 0, 1, PlaylistEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getPlaylistEntry_Playlist(), this.getPlaylist(), this.getPlaylist_Elements(), "playlist", null, 0, 1, PlaylistEntry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(iPlayableEClass, IPlayable.class, "IPlayable", IS_ABSTRACT, IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS);

		initEClass(iPlaylistEClass, IPlaylist.class, "IPlaylist", IS_ABSTRACT, IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS);

		initEClass(playableEClass, Playable.class, "Playable", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getPlayable_State(), this.getPlayableState(), "state", "STOPPED", 0, 1, Playable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(abstractPlaylistEClass, AbstractPlaylist.class, "AbstractPlaylist", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		g1 = createEGenericType(this.getIPlaylistController());
		g2 = createEGenericType(abstractPlaylistEClass_T);
		g1.getETypeArguments().add(g2);
		initEAttribute(getAbstractPlaylist_Controller(), g1, "controller", null, 0, 1, AbstractPlaylist.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		EOperation op = addEOperation(abstractPlaylistEClass, null, "getElements", 0, -1, IS_UNIQUE, IS_ORDERED);
		g1 = createEGenericType(abstractPlaylistEClass_T);
		initEOperation(op, g1);

		initEClass(filteredPlaylistEClass, FilteredPlaylist.class, "FilteredPlaylist", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getFilteredPlaylist_Filter(), this.getIPlayableFilter(), "filter", null, 0, 1, FilteredPlaylist.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		g1 = createEGenericType(this.getAbstractPlaylist());
		g2 = createEGenericType();
		g1.getETypeArguments().add(g2);
		EGenericType g3 = createEGenericType(this.getPlayable());
		g2.setEUpperBound(g3);
		initEReference(getFilteredPlaylist_Delegate(), g1, null, "delegate", null, 0, 1, FilteredPlaylist.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getFilteredPlaylist_Elements(), this.getPlayable(), null, "elements", null, 0, -1, FilteredPlaylist.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);

		initEClass(iPlayerEClass, IPlayer.class, "IPlayer", IS_ABSTRACT, IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS);

		initEClass(iPlayerListenerEClass, IPlayerListener.class, "IPlayerListener", IS_ABSTRACT, IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS);

		initEClass(iPlayerEventEClass, IPlayerEvent.class, "IPlayerEvent", IS_ABSTRACT, IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS);

		// Initialize enums and add enum literals
		initEEnum(playableStateEEnum, PlayableState.class, "PlayableState");
		addEEnumLiteral(playableStateEEnum, PlayableState.PLAYING);
		addEEnumLiteral(playableStateEEnum, PlayableState.PAUSED);
		addEEnumLiteral(playableStateEEnum, PlayableState.STOPPED);

		// Initialize data types
		initEDataType(uriEDataType, org.eclipse.emf.common.util.URI.class, "URI", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
		initEDataType(iPlaylistControllerEDataType, IPlaylistController.class, "IPlaylistController", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
		initEDataType(iPlayableFilterEDataType, IPlayableFilter.class, "IPlayableFilter", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);

		// Create resource
		createResource(eNS_URI);
	}

} //KayleePackageImpl
